package kr.hkit.powerjava.chapter11.submit;

public class Triangle extends Shape {

	private int a,b,c;

	public Triangle(int a, int b, int c) {
		this.a = a;
		this.b = b;
		this.c = c;
	}

	public Triangle() {
	}
	
	public int getA() {
		return a;
	}

	public int getB() {
		return b;
	}
	public int getC() {
		return c;
	}
	public void setA(int a) {
		this.a = a;
	}
	public void setB(int b) {
		this.b = b;
	}
	public void setC(int c) {
		this.c = c;
	}
	
	@Override
	public int circumference() {
		return a+b+c;
	}

	@Override
	public int area() {
		return b*c/2;
	}
	
	@Override
	public String toString() {
		return "[삼각형 길이 a=" + a + ", b=" + b + ", c=" + c
				+ "], [삼각형의 좌표 X:" + getX() + ", Y:" + getY()+ "], "
				+ "[삼각형 둘레: " + circumference() + "], "
				+ "[삼각형 넓이: " + area()+ "] " ;
	}

	public static void main(String[] args) {
		Triangle t = new Triangle(3, 3, 6);
		t.setX(5);
		t.setY(10);
	
		System.out.println(t);
	}
}
